package com.cnunicom.modules.tra.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import com.cnunicom.common.utils.Constant;
import com.cnunicom.common.utils.JsonLongSerializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * 单位职员表
 *
 * @author dzygod
 * @email dingziyuan0@gmail.com
 * @date 2020-01-16 22:05:46
 */
@Data
@TableName("tra_unit_staff")
public class UnitStaffEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	@TableId(type = IdType.INPUT)
	@JsonSerialize(using = JsonLongSerializer.class)
	@ApiModelProperty(value = "id")
	private Long id;

	@ApiModelProperty(value = "员工姓名")
	private String name;

	@ApiModelProperty(value = "所属部门")
	private String dept;

	@ApiModelProperty(value = "员工手机号")
	@NotBlank(message = "手机号不能为空")
	@Pattern(regexp = Constant.REGULAR_PHONE, message = "手机号格式错误")
	private String phoneNum;

	@ApiModelProperty(value = "二维码保存地址")
	private String qrCodeUrl;

	@ApiModelProperty(value = "会员总数")
	private Integer totalMember;

	@ApiModelProperty(value = "创建时间")
	private String createTime;

	@ApiModelProperty(value = "逻辑删除")
	@TableLogic
	private Integer isDel;

	@ApiModelProperty(value = "自定义字段")
	private String def0;

	@ApiModelProperty(value = "自定义字段")
	private String def1;

}
